#ifndef _FIG_BOSS_U14_H_
#define _FIG_BOSS_U14_H_

#include "fig_enemy_boss.h"

class FIGBossLaser;


class FIGBossU14	: public FIGEnemyBoss
{
public:

	const static float		LASER_SCALE_WITHOUT_GLOW;

	struct		LaserHand
	{
		enum	BONE_MOVEMENT
		{
			MOVEMENT_NONE,
			MOVEMENT_CLOCKWISE,
			MOVEMENT_ANTICLOCKWISE,			
			MOVEMENT_C
		};

		LaserHand(
					FIGBonePart* pArm,
					FIGBonePart* pMidHand,
					FIGBonePart* pLaserBone,
					float		 ArmClockWiseLimit,
					float		 ArmAntiClockWiseLmit,
					float		 ForeArmClockWiseLimit,
					float		 ForeArmAntiClockWiseLmit

					
					
					);

		void				Tick(float dt);
		math::Vec2			GetLaserShootPoint(const math::Vec2& Origianl_WP) const;	

		FIGBonePart*		m_pArm;
		FIGBonePart*		m_pMidHand;
		FIGBonePart*		m_pLaserBone;
		


		BONE_MOVEMENT		m_MidHandMovement;
		float				m_MidHandRotateSpeed;
		math::Counter		m_MidHandRotateCounter;	

		BONE_MOVEMENT		m_ArmMovement;
		float				m_ArmRotateSpeed;
		math::Counter		m_ArmRotateCounter;	

		float				m_ArmClockWiseLimit;
		float				m_ArmAntiClockWiseLimit;
		float				m_ForeArmClockWiseLimit;
		float				m_ForeArmAntiClockWiseLimit;

		

	};

	struct		RocketShootingBone
	{
		enum	ROCKET_BONE_MOVEMENT
		{
			MOVEMENT_NONE,
			MOVEMENT_CLOCKWISE,
			MOVEMENT_ANTICLOCKWISE,			
			MOVEMENT_C
		};

		RocketShootingBone(	FIGLifeObj* pOwner, 
							FIGBonePart* pBonePart,
							const math::Vec2& Pos_WP
							);

		void					Tick(float dt);
		void					Shoot(int Count,float Delay);

		FIGBonePart*			m_pBone;
		math::Counter			m_RotateCounter;
		ROCKET_BONE_MOVEMENT	m_CurrentMovementType;
		float					m_RotateSpeed;

		int						m_CountToShoot;
		float					m_ShootDelay;
		float					m_ShootCounter;
		FIGLifeObj*				m_pOwner;
		math::Vec2				m_Pos_WP;
		

	};
	     
	FIGBossU14(FIGEnemyCraft::ENEMY_TYPES EnemyType);
    	
	virtual void			ReSpawn();
	
	virtual	void			Render(const math::Vec2& Offset,float Scale);
	virtual	void			RenderDebug(const math::Vec2& Offset,float Scale);
	virtual void			Tick_Attack(float dt);

	
protected:

	virtual void			OnShootStyle1();
	virtual void			OnShootStyle2();
	virtual void			OnShootStyle3();
	virtual void			OnShootStyle4();
	virtual void			OnDie();
	virtual bool			CanTransformBackAttack() const;

	void					OnSecondaryWeaponShoot();

	void					OnSecondaryType1();
	void					OnSecondaryType2();


	FIGBossLaser*			m_pBossLaser;

	RocketShootingBone*		m_pRocketShooterLeft;
	RocketShootingBone*		m_pRocketShooterRight;

	LaserHand*				m_pLaserHandLeft;
	LaserHand*				m_pLaserHandRight;
	
	
};

#endif	  // _FIG_BOSS_VIPER_H_